home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / program / eflibpt4.zip / DEMO / ADVANCED / ARRAYTST.PAS next >
Pascal/Delphi Source File  |  1996-08-16  |  1KB  |  34 lines

  1. { Borland Pascal Extended Function Library - EFLIB (C) Johan Larsson, 1996
  2.   Demonstration; example on ARRAYLST.PAS implementation
  3.  
  4.   EFLIB IS PROTECTED BY THE COPYRIGHT LAW AND MAY NOT BE COPIED, SOLD OR
  5.   MANIPULATED. FOR MORE INFORMATION, SEE PROGRAM MANUAL! THIS DEMONSTRAT-
  6.   ION PROGRAM MAY FREELY BE USED AND DISTRIBUTED.                          }
  7.  
  8.  
  9. uses EFLIBDEF, STDARRAY;
  10.  
  11. var MyArray : StandardArrayObjectType; Number : real;
  12.  
  13. begin
  14.      WriteLn ('* Standard Pascal array implemented as a polymorphic EFLIB data type *');
  15.  
  16.      with MyArray do begin
  17.           Initialize;
  18.  
  19.           { Add some elements }
  20.           Number := 1.1; Add (Number);
  21.           Number := 2.2; Add (Number);
  22.           Number := 4.4; Add (Number);
  23.  
  24.           with CreateIterator^ do begin
  25.                repeat
  26.                      WriteLn (Real(Content^):0:2);
  27.                      WalkForward;
  28.                until IsEnd;
  29.                Free;
  30.           end;
  31.  
  32.           Intercept;
  33.      end;
  34. end.